package com.fjsdfx.starerp.persons.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;



/**
 * 部门信息表
 * @author 
 *
 */
@Entity
@Table(name="department")
public class Department implements Serializable{
	
	
	
	private Set<Ytrainplan> ytrainplans2=new HashSet<Ytrainplan>();
	@OneToMany(mappedBy="withf",cascade={CascadeType.ALL})
	public Set<Ytrainplan> getYtrainplans2() {
		return ytrainplans2;
	}

	public void setYtrainplans2(Set<Ytrainplan> ytrainplans2) {
		this.ytrainplans2 = ytrainplans2;
	}

	private Set<Ytrainplan> ytrainplans = new HashSet<Ytrainplan>();
	@OneToMany(mappedBy="department",cascade={CascadeType.ALL})
	public Set<Ytrainplan> getYtrainplans() {
		return ytrainplans;
	}

	public void setYtrainplans(Set<Ytrainplan> ytrainplans) {
		this.ytrainplans = ytrainplans;
	}

	private Set<Training> trainings = new HashSet<Training>();
	@OneToMany(mappedBy="department",cascade={CascadeType.ALL})
	public Set<Training> getTrainings() {
		return trainings;
	}

	public void setTrainings(Set<Training> trainings) {
		this.trainings = trainings;
	}

	private Set<Recruitment> recruitments = new HashSet<Recruitment>();
	@OneToMany(mappedBy="department",cascade={CascadeType.ALL})
	public Set<Recruitment> getRecruitments() {
		return recruitments;
	}

	public void setRecruitments(Set<Recruitment> recruitments) {
		this.recruitments = recruitments;
	}


	
	

	/**
	 * 部门ID
	 */
	private Integer id;
	
	/**
	 * 部门名称
	 */
	private String dptName;
	
	

	/**
	 * 部门描述
	 */
	private String dptDes;
	
	
	
	
	@JoinColumn(name="dpt_id")
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@JoinColumn(name="dpt_name")
	public String getDptName() {
		return dptName;
	}

	public void setDptName(String dptName) {
		this.dptName = dptName;
	}

	@JoinColumn(name="dpt_des")
	public String getDptDes() {
		return dptDes;
	}

	public void setDptDes(String dptDes) {
		this.dptDes = dptDes;
	}
}
